//---------------------------------------------------------------------------

#ifndef SequenceH
#define SequenceH

#include <dbtables.hpp>
//---------------------------------------------------------------------------

class TSequence
{
   public :
      TSequence( TDatabase * db);
      ~TSequence();

      __int64 GetLastValue( AnsiString name);
      __int64 GetNextValue( AnsiString name);

   protected :
      TQuery * qryGet;
      TQuery * qryUpdate;

      void BuildGetQuery();
      void BuildUpdateQuery();
};

#endif
